const model = {
  key: "sql",
  name: "SQL数据库连接",
  group: ["db"],

  libs: [
    {
      key: "sequelize",
      name: "sequelize",
      href: "https://sequelize.org/",
    },
  ],
  config: {
    database: {
      key: "database",
      value: "",
      description: "数据库名称",
      remark: "",
      required: true,
    },
    domain: {
      key: "domain",
      value: "",
      description: "数据库地址",
      remark: "例如 127.0.0.1",
      required: true,
    },
    user: {
      key: "user",
      value: "",
      description: "数据库用户名",
      remark: "",
      required: true,
    },
    password: {
      key: "password",
      value: "",
      description: "数据库密码",
      remark: "",
      required: true,
    },
  },
  template: [
    {
      key: "base",
      name: "基础",
      input: {},
      output: {},
      url: "/api/libs/sql/base.js",
    },
    {
      key: "mssql",
      name: "SQL Server数据库",
      input: {},
      output: {},
      url: "/api/libs/sql/mssql.js",
    },
  ],
};

module.exports = model;
